import React, { Component } from 'react';

class App extends Component {

  state = {
    msg: '<h1><b style="color: red">React</b>从入门到入坑</h1>',
  }


  render() {
    return (
      <React.Fragment>
        {/* React.Fragment 也是 react 中的空标签 */}
       {/* dangerouslySetInnerHTML 是用来插入需要解析的 html 字符串用的 */}
      <div dangerouslySetInnerHTML={{__html: this.state.msg}}>
      </div>

      </React.Fragment>
    );
  }
}

export default App;
